public class Example31 {
    public static void main(String[] args) {

    int [] [] arr = new int[3][];
    arr[0] = new int[]{11,12};
    arr[1] = new int[]{21,22,23};
    arr[2] = new int[]{31,32,33,34};
    int sum =0;
        for (int i = 0; i < arr.length; i++) {
            int groupSum = 0;
            for (int i1 = 0; i1 < arr[i].length; i1++) {
                groupSum = groupSum + arr[i][i1];
            }
            sum +=groupSum;
            System.out.println("第"+ (i+1) + "小组销售额为" + groupSum +"万元");
        }
        System.out.println("总销售额为" + sum + "万元");
    }

}
